﻿using System.Text.Json.Serialization;

namespace Journeo_backend.Models.GPT
{
    public class BaseChatRequest
    {
        public string Model { get; set; } = "gpt-4o-mini-2024-07-18";
        public List<Message> Messages { get; set; } = new List<Message>();

        [JsonPropertyName("response_format")]
        public ResponseFormat ResponseFormat { get; set; }

        public BaseChatRequest()
        {
            Messages = new List<Message>();
            // 提供默认的 ResponseFormat
            ResponseFormat = new ResponseFormat
            {
                Type = "json_schema",
                JsonSchema = new JsonSchema
                {
                    Name = "default_response",
                    Schema = SchemaConstants.SimpleResponse
                }
            };
        }
    }

}
